package com.qiaowan.ui;

import javax.swing.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class RegisterJframe extends JFrame implements MouseListener {



    //注册界面
    public RegisterJframe(){
        initJFrame();
        initView();
        //让界面显示出来
        this.setVisible(true);
    }

    private void initView() {
        JLabel Username = new JLabel(new ImageIcon("image/register/注册用户名.png"));
        this.getContentPane().add(Username);


    }

    private void initJFrame(){
         this.setSize(488,500);
         //设置界面标题
         this.setTitle("拼图游戏注册界面");
         //设置界面置顶(点击其他界面还在最上层)
         this.setAlwaysOnTop(true);
         //设置界面居中
         this.setLocationRelativeTo(null);
         //设置关闭模式(点×结束程序运行)
         this.setDefaultCloseOperation(3);//3为关一个界面程序停止(WindowConstants.EXIT_ON_CLOSE)2为关闭所有界面才停止
     }
    @Override
    public void mouseClicked(MouseEvent e) {

    }

    @Override
    public void mousePressed(MouseEvent e) {

    }

    @Override
    public void mouseReleased(MouseEvent e) {

    }

    @Override
    public void mouseEntered(MouseEvent e) {

    }

    @Override
    public void mouseExited(MouseEvent e) {

    }
}
